﻿using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;
using TianShu.TenantManagement.Dal.Abstracts.Entities;

namespace TianShu.TenantManagement.Dal.Abstracts.Manager
{
    public interface ITenantManager : IDomainService
    {
        [NotNull]
        Task<TenantEntity> CreateAsync([NotNull] string code, [NotNull] string name);

        Task ChangeNameAsync([NotNull] TenantEntity tenant,  [NotNull] string name);
        Task<TenantEntity> FindAndConnectionStringAsync(Expression<Func<TenantEntity,bool>> expression);
        Task<TenantEntity> UpdateAndConnectionStringAsync(TenantEntity entity);
    }
}
